import {createRouter, createWebHistory} from 'vue-router'
import HomeView from '../views/HomeView.vue'
import CampaignView from "@/views/CampaignView"
import MallView from "@/views/MallView";
import PlanView from "@/views/PlanView";
import PlanPageView from "@/views/PlanPageView";
import VideoMotionView from "@/views/MotionVideoView";
import MyView from "@/views/MyView";
import CommunityView from "@/views/CommunityView";
import ShopTypeView from "@/views/ShopTypeView";
import RunningView from "@/views/RunningView";
import YogaView from "@/views/YogaView";
import MallSearch from "@/views/MallSearch";
import TrainView from "@/views/TrainView";
import PublishView from "@/views/PublishView";
import LoginView from "@/views/LoginView";
import RegisterView from "@/views/RegisterView";
import FindView from "@/views/FindView";
import ShoppingCartView from "@/views/ShoppingCartView";
import UpdateDataView from "@/views/UpdateDataView";
import SignView from "@/views/SignView";
import CommunityHeartView from "@/views/CommunityHeartView";
import CommunityRemarkView from "@/views/CommunityRemarkView";
import OrderView from "@/views/OrderView";
import MyActivityView from "@/views/MyActivityView";
import ChatView from "@/views/ChatView";
import VipView from "@/views/VipView";
import MapRunView from "@/views/MapRunView";


const routes = [
  {
    path: '/home',
    name: 'home',
    component: HomeView,
    meta:{
      TabBarShow :true
    }
  },{
        path: '/order',
        name: 'order',
        component: OrderView,
        meta:{
            TabBarShow :true
        }
    },
    {
        path: '/search',
        name: 'search',
        component: MallSearch,
        meta:{
            TabBarShow :true
        }
    },
    {
        path: '/cart',
        name: 'cart',
        component: ShoppingCartView,
        meta:{
            TabBarShow :true
        }
    },
    {
        path: '/chat',
        name: 'chat',
        component: ChatView,
        meta:{
            TabBarShow : false
        }
    },
    {
    path: '/find',
    name: 'find',
    component: FindView,
    meta:{
      TabBarShow :false
    }
  },
   {
    path: '/myactivity',
    name: 'myactivity',
    component: MyActivityView,
    meta:{
      TabBarShow :false
    }
  },
  {
    path: '/updateData',
    name: 'updateData',
    component: UpdateDataView,
  }
    ,
    {
        path: '/',
        name: 'login',
        component: LoginView,
        meta: {
            TabBarShow: false
        }
    }, {
        path: '/register',
        name: 'register',
        component: RegisterView,
        meta: {
            TabBarShow: false
        }
    },
    {
        path: '/Run',
        name: 'Run',
        component: RunningView,
        meta: {
            TabBarShow: false
        }

  },
    ,
    {
        path: '/maprun',
        name: 'maprun',
        component: MapRunView,
        meta: {
            TabBarShow: true
        }
    },{
    path: '/mall',
    name: 'mall',
    component: MallView,
    meta:{
      TabBarShow :true
    }
  },
   {
    path: '/shoptype',
    name: 'shoptype',
    component: ShopTypeView,
     meta:{
       TabBarShow :false
     }
  },
 ,{
    path: '/Camp',
    name: 'Camp',
    component: CampaignView,
    meta:{
      TabBarShow :true
    }
  },
  {
    path: '/community',
    name: 'community',
    component: CommunityView,
    meta:{
      TabBarShow :true
    }
    },  {
        path: '/Yoga',
        name: 'Yoga',
        component: YogaView,
        meta: {
            TabBarShow: true
        }
    },
    {
        path: '/remark',
        name: 'remark',
        component: CommunityRemarkView,
        meta: {
            TabBarShow: false
        }
    },
    {
        path: '/communityHeart',
        name: 'communityHeart',
        component: CommunityHeartView,
        meta:{
            TabBarShow :false
        }
    },
    {
        path: '/publish',
        name: 'publish',
        component: PublishView,
        meta: {
            TabBarShow: false
        }
    },
    {
        path: '/Plan',
        name: 'Plan',
        component: PlanView,
        meta: {
            TabBarShow: true
        }
    }, {
        path: '/Planpage',
        name: 'Planpage',
        component: PlanPageView,

    }, {
        path: '/Video',
        name: 'Video',
        component: VideoMotionView,
        meta: {
            TabBarShow: true
        }
    }, {
        path: '/my',
        name: 'my',
        component: MyView,
        meta: {
            TabBarShow: true
        }
    },
    {
        path: '/Train',
        name: 'Train',
        component: TrainView

    },
    {
        path: '/sign',
        name: 'sign',
        component: SignView

    },
    {
        path: '/vip',
        name: 'vip',
        component: VipView

    },
    {
        path: '/about',
        name: 'about',
        component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    }
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
